using System;
using System.Collections.Generic;
using System.Linq;
using Locator.Silverlight.Client.Models.ViewModels.Elements;
using Locator.Silverlight.Client.Models.PersonalLocationsServiceReference;

namespace Locator.Silverlight.Client.Models
{
    public interface IPersonalLocationModel
    {
        /// <summary>
        /// Gets the personal locations for the current user.
        /// </summary>
        /// <returns></returns>
        void GetPersonalLocationsForCurrentUserAsync(Action<List<PersonalLocationViewModel>, Exception> callback);

        /// <summary>
        /// Gets a personal location for the current user.
        /// </summary>
        /// <param name="ID">The ID.</param>
        /// <returns></returns>
        void GetPersonalLocationForCurrentUserAsync(int ID, Action<PersonalLocationViewModel, Exception> callback);

        /// <summary>
        /// Adds a personal location for current user.
        /// </summary>
        /// <param name="description">The description.</param>
        /// <param name="latitude">The latitude.</param>
        /// <param name="longitude">The longitude.</param>
        void AddPersonalLocationForCurrentUserAsync(string description, double latitude, double longitude, Action<Exception> callback);

        /// <summary>
        /// Deletes a personal location for current user.
        /// </summary>
        /// <param name="personalLocationId">The personal location id.</param>
        void DeletePersonalLocationForCurrentUserAsync(int personalLocationId, Action<Exception> callback);

        void SearchByAddressAsync(string streetAddress, string country, string province, string city, Action<Location, Exception> callback);

        void SearchByPostalCodeAsync(string postalCode, string country, Action<Location, Exception> callback);
    }
}
